import React from 'react';
import { Form } from 'antd';
import { FundApplicationIndustryC, FirstHeaderC } from '../../../components';

class FundApplicationIndustry extends React.Component {
  constructor() {
    super();
    this.formRef = React.createRef();
    this.state = {
      values: 'B06',
    };
  }

  componentDidMount() {}

  render() {
    return (
      <Form ref={this.formRef}>
        <FirstHeaderC title='没有初始值的情况' />
        <FundApplicationIndustryC title='资金运用行业' dataIndex='rateIndustry' form={this.formRef.current} />
        <FirstHeaderC title='有初始值的情况,父节点可被点击选中' />
        <FundApplicationIndustryC
          rules={[{ required: true, message: '必选项' }]}
          title='资金运用行业'
          dataIndex='rateIndustry1'
          form={this.formRef.current}
          initialValue={this.state.values}
          parentCanClick={true}
          allowClear={true}
        />
        <FirstHeaderC title='只有一层的数据展示,不允许搜索,测试占位符' />
        <FundApplicationIndustryC
          title='资金运用行业'
          dataIndex='rateIndustry2'
          form={this.formRef.current}
          OnlySupportFirstLevel={true}
          parentCanClick={true}
          showSearch={false}
          placeholder={'placeholder测试'}
        />
        <FirstHeaderC title='有初始化值，被禁用' />
        <FundApplicationIndustryC title='资金运用行业' dataIndex='rateIndustry3' form={this.formRef.current} parentCanClick={true} initialValue={'E48'} disabled={true} />
      </Form>
    );
  }
}

export default FundApplicationIndustry;
